package dhy.com.tomcat.four.core;

import dhy.com.tomcat.four.core.connector.HttpConnector;
import dhy.com.tomcat.four.core.container.SimpleContainer;

import java.io.IOException;

/**
 * <p>
 *     final防止别人继承破坏
 * </p>
 * @author zdh
 */
public final class BootStrap{
    public static void main(String[] args) {
        //创建连接器
        HttpConnector connector=new HttpConnector();
        //设置连接器关联的容器
        SimpleContainer container=new SimpleContainer();
        try {
            //连接器启动和初始化
            connector.initialize();
            connector.start();
            //用户可按任意键退出
            System.in.read();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
